home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-02-28 | 1.5 KB | 38 lines | [TEXT/R*ch] |
- ModalDialog by Maurice Sharp
- Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved.
- For NTK 1.0b4
-
- This sample shows how to use the ModalDialog() view message.
- ModalDialog behaves like Open. Until the view opened by this message
- is closed, most tapping in built in applications will not produce
- any effects (in other words, tapping a the Dates button will not
- bring up the datebook, clicking on the file folder in the Notepad
- will not bring up the filing dialog). A notable exception is that
- you can still write on the notepad.
-
- Important Things
- ----------------
-
- 1. You have to send the ModalDialog message in a deffered action.
-
- Take a look at the buttonClickScript of the text button in main.t
-
- It calls a function in the man protoApp (myBase) called doModal.
- This is a simple function that you can use for your own enjoyment.
-
-
- 2. You must take care of your preventing taps to your own application.
-
- The modal.t layout has a large clView as a base. This is used to mask
- taps from the underlying application. It will size itself to its
- parent using full H and V justification (viewJustify slot). This view
- is invisible (Fill None) and takes Taps). It prevents taps getting through
- to your base application (like the close box or clock of the Modal Fun protoApp)
-
- 3. Close the modal view or forever be modal
-
- Closing the view that was opened with the ModalDialog message will
- exit the modal state (clever huh?). That is why the OK and Cancel
- buttons close it. Of course, closing your application would do the
- same thing.
-